
export interface ResponseData {
    status: number
    success?: {
        message: string
    }
    error?: {
        message: string
        code: number
    }
}

export interface HandleMemberCRUD {
    mode: 'create' | 'delete' | 'update' | 'read'
    // search
    create?: {
        handle_name: string
        mnemonic: string
        creator: string
        use: boolean
        group_id: number
    }
    delete?: {
        id: number
    }
    update?: {
        handle_name: string
        mnemonic: string
        use: boolean
        id: number
        creator: string
        group_id: number

    }
    read?: {
        id: number
        use: boolean
        start: number
        stop: number
        group_id: number
    }
}

// 添加处理方信息 返回参数
export interface HandleMemberCRUDResponse extends ResponseData {
    create?: {
        id: number
        date: string
    }
    delete?: {}
    update?: string
    read?: {
        handle_list: HandleMemberList[]
        total: number
    }
}

// 页面表格信息
export interface HandleMemberList {
    id: number
    handle: string
    mnemonic: string
    creator: string
    use: boolean
    creation_date_str: string
    handle_group__name: string
    handle_group_id: number
}


export interface HandleClassCRUD {
    mode: 'create' | 'delete' | 'update' | 'read'
    // search
    create?: {
        name: string
        mnemonic: string
        creator: string
    }
    delete?: {
        group_id: number
    }
    update?: {
        group_id: number
        name: string
        mnemonic: string
        creator: string
        use: boolean
    }
    read?: {
        use: boolean
    }
}


// 添加处理方信息 返回参数
export interface HandleClassCRUDResponse extends ResponseData {
    create?: {}
    delete?: {}
    update?: {}
    read?: HandleClassList[]
}


// 页面表格信息
export interface HandleClassList {
    id: number
    name: string
    mnemonic: string
    creator: string
    use: boolean
    creation_date_str: string
}


// 余额表增删改查
export interface HandleBalanceCRUD {
    mode: 'create' | 'delete' | 'update' | 'read'
    create?: {
        handle_id: number
        pay_date: string
        pay_amount: number
        signatory: string
        operator: string
        trend: boolean
    }
    delete?: {
        handle_balance_id: number
        operator: string
    }
    update?: {
        id: number
        pay_date: string
        pay_amount: number
        signatory: string
        operator: string
        trend: boolean
    }
    read?: {
        date_start: string
        date_end: string
        handle_id: number | ''
        trend: string
    }
}

// 余额表增删改查 返回参数
export interface HandleBalanceCRUDResponse extends ResponseData {
    create?: {}
    delete?: {}
    update?: {}
    read?: HandleBalanceList[]
}

export interface HandleBalanceList {
    id: number
    handle_id: number
    handle_name: string
    pay_amount: number
    signatory: string
    operator: boolean
    pay_date_str: string
    operate_date_str: string
    trend: boolean
}


export interface HandleBalanceTableCRUD {
    date_start: string
    date_end: string
    mode: 'json' | 'xls'
}


// 余额表增删改查 返回参数
export interface HandleBalanceTableCRUDResponse extends ResponseData {
    data: HandleBalanceTableList[]
}

export interface HandleBalanceTableList {
    handle_name: string
    qcye: number
    bqyf: number
    bqfk: number
    qmye: number
}